<?php
class Season extends AppModel {

	var $name = 'Season';

	var $hasMany = array(
		'Calendar' => array(
			'className' => 'Calendar',
			'foreignKey' => 'season_id',
			'dependent' => false,
		)
	);

//	var $hasAndBelongsToMany = array(
//        'Team' => array(
//			'className' => 'Team',
//			'joinTable' => 'team_statistics',
//			'foreignKey' => 'season_id',
//			'associationForeignKey' => 'team_id',
//			'unique' => true,
//		),
//		'Division' => array(
//			'className' => 'Division',
//			'joinTable' => 'team_statistics',
//			'foreignKey' => 'season_id',
//			'associationForeignKey' => 'division_id',
//			'unique' => true,
//		)
//	);

//	var $belongsTo = array(
//		'Championship'
//	);

    function nextDay($conditions)
    {
		$season = $this->find('first',$conditions);
		$season['iDay']++;
		$this->save($season);
    }

}
?>